Matthias Clasen [Thu, 24 Jun 2021 14:50:59 +0000 (14:50 +0000)]
Merge branch 'macos-input-method' into 'master'
macos: fix the position of curosr of input method for macos.
Closes #4063
See merge request GNOME/gtk!3699
Emmanuele Bassi [Wed, 23 Jun 2021 13:09:28 +0000 (13:09 +0000)]
Merge branch 'gtklistitem-autocleanup' into 'master'
gtk: Define the GtkListItem autocleanup func
See merge request GNOME/gtk!3698
Emmanuele Bassi [Wed, 23 Jun 2021 13:08:07 +0000 (13:08 +0000)]
Merge branch 'migration_patch' into 'master'
Add section about `gtk_widget_set_app_paintable`
Closes #4007
See merge request GNOME/gtk!3641
Jaap aarts [Wed, 23 Jun 2021 13:08:06 +0000 (13:08 +0000)]
Add section about `gtk_widget_set_app_paintable`
Zhi [Mon, 21 Jun 2021 23:20:53 +0000 (07:20 +0800)]
macos: fix the position of curosr of input method for macos.
In the refactoring from GdkWindow to GdkSurface, GtkWidget no longer
corresponds to a GdkSurface. We have to calculate the relative position
from GtkWidget to the GdkSurface.
Closes #4063.
Adrien Plazas [Tue, 22 Jun 2021 07:41:18 +0000 (09:41 +0200)]
gtk: Define the GtkListItem autocleanup func
Carlos Garnacho [Mon, 21 Jun 2021 21:35:06 +0000 (21:35 +0000)]
Merge branch 'fix-pointer-gestures-kde-plasma' into 'master'
gdk/wayland: Fix pointer-gestures version selection
See merge request GNOME/gtk!3693
Vlad Zahorodnii [Mon, 21 Jun 2021 06:22:29 +0000 (09:22 +0300)]
gdk/wayland: Fix pointer-gestures version selection
version == GDK_ZWP_POINTER_GESTURES_V1_VERSION will fail if the
compositor implements version 2 of pointer-gestures-v1.
Emmanuele Bassi [Sun, 20 Jun 2021 14:41:43 +0000 (15:41 +0100)]
Revert "Never show the Trash in the FileChooserWidget side bar"
This reverts commit
cd39e417e1f816e7c509f9c14e4a0b61fce81430.
Emmanuele Bassi [Sun, 20 Jun 2021 14:39:41 +0000 (15:39 +0100)]
Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.
Fixes: #674
Matthias Clasen [Sat, 19 Jun 2021 20:36:44 +0000 (20:36 +0000)]
Merge branch 'wip/chergert/textview-access-to-contexts' into 'master'
textview: give application developers access to RTL and LTR context
See merge request GNOME/gtk!3690
Christian Hergert [Sat, 19 Jun 2021 19:20:23 +0000 (12:20 -0700)]
textview: give application developers access to RTL and LTR context
This allows developers to modify the pango context that is used when
rendering text within the text view.
Such access can be useful to alter how rounding occurs with API such as
pango_context_set_round_glyph_positions() and is needed by GtkSourceView
for proper placement of glyphs within the overview map.
Matthias Clasen [Fri, 18 Jun 2021 17:31:51 +0000 (17:31 +0000)]
Merge branch 'fix-3798' into 'master'
GDK-Win32: Fix drag surface positioning (issue #3798)
Closes #3798
See merge request GNOME/gtk!3659
Matthias Clasen [Fri, 18 Jun 2021 17:00:58 +0000 (17:00 +0000)]
Merge branch 'gsk-big-batches' into 'master'
ci: Build Broadway on MacOS
See merge request GNOME/gtk!3686
Matthias Clasen [Fri, 18 Jun 2021 14:09:49 +0000 (14:09 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
ci: Build Broadway on MacOS
See merge request GNOME/gtk!3685
Matthias Clasen [Fri, 18 Jun 2021 13:50:59 +0000 (06:50 -0700)]
gsk: Respect max element vertices limitation
We are pretty good at batching commands now, and we can easily
produce batches that exceed the maximum number of elements per
draw call that the hw can handle. Query that number, and respect
it when merging batches.
This fixes the rendering of the overview map in GtkSourceView.
Matthias Clasen [Fri, 18 Jun 2021 13:08:32 +0000 (06:08 -0700)]
ci: Build Broadway on MacOS
We've seen a build failure if Broadway is built without
the X11 backend. Lets recreate that configuration in ci
so it doesn't break again.
Chun-wei Fan [Fri, 18 Jun 2021 09:58:14 +0000 (17:58 +0800)]
gdkdrag-win32.c: Fix drag surface positioning
Determine the root_x and root_y coordinates of the drag surface by
relying on the coordinates of the surface where the drag is being
carried out, plus the coordinates that we receive from the drag event,
which is in-line with what the X11 backend does.
This will prevent the drag surface from being initially drawn at the
correct position, but jumping towards the top-left corner of the screen
shortly afterwards.
The DnD support will still need some more updates to function correctly
on Windows, but at least this is a small improvement.
Fixes issue #3798.
Matthias Clasen [Fri, 18 Jun 2021 04:37:48 +0000 (04:37 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
treeviewcolumn: Clip header buttons
Closes #4045
See merge request GNOME/gtk!3682
Matthias Clasen [Thu, 17 Jun 2021 22:54:36 +0000 (15:54 -0700)]
treeviewcolumn: Clip header buttons
We don't want to overdraw when dragging a narrow column
around, and we also need the clipping to avoid picking
the wrong column, when a later column button overlaps
an earlier one.
Fixes: #4045
Matthias Clasen [Thu, 17 Jun 2021 13:40:22 +0000 (09:40 -0400)]
macos: Fix a compiler warning
Matthias Clasen [Thu, 17 Jun 2021 19:45:16 +0000 (19:45 +0000)]
Merge branch 'wip/chergert/fix-broadway-build' into 'master'
inspector: fix compilation with broadway
See merge request GNOME/gtk!3681
Christian Hergert [Thu, 17 Jun 2021 18:40:10 +0000 (11:40 -0700)]
inspector: fix compilation with broadway
Matthias Clasen [Thu, 17 Jun 2021 17:53:16 +0000 (17:53 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
action muxer fixes
See merge request GNOME/gtk!3678
Hugo Carvalho [Thu, 17 Jun 2021 14:44:36 +0000 (14:44 +0000)]
Update Portuguese translation
(cherry picked from commit
807537dd5dc306edfae5abd82fbbb3e346f6d682)
Matthias Clasen [Thu, 17 Jun 2021 13:37:45 +0000 (09:37 -0400)]
testsuite: Avoid a compiler warning
This was showing up in ci on macos.
Matthias Clasen [Thu, 17 Jun 2021 12:59:30 +0000 (08:59 -0400)]
widget-factory: Show Ctrl-? in the menu
We use our own action for showing the shortcuts window,
so we need to associate this shortcut with our action
for it to show up.
Matthias Clasen [Thu, 17 Jun 2021 12:43:48 +0000 (08:43 -0400)]
shortcutcontroller: Don't reinject menu accels
The normal way to associate accels with actions is
to attach a shortcut controller to the widget. The shorcut
controller will inject the accel into the action muxer
tree, so that it can get displayed in widgets that activate
the action (say, in menus.
This approach does not works for generated menus, since the
widgets are not in the hands of the app developer, so attaching
shortcut controllers to them is impractical.
Instead, GtkModelButton has an accel property that gets
bound to the accel coming from the action muxer tree (most
likely put there via gtk_application_set_accel_for_action),
and creates a shortcut controller itself.
The change in this commit is to prevent the shortcut controller
from injecting the accel into the action muxer tree in this case.
Otherwise, the accels get 'stuck' and we won't update them if the
global accels are later changed.
This is a hack, and needs a better solution.
Matthias Clasen [Thu, 17 Jun 2021 12:32:11 +0000 (08:32 -0400)]
window: Propagate accel changes
When the global accels change, tell the
shortcut controller to re-inject them into
the action muxer hierarchy.
Matthias Clasen [Thu, 17 Jun 2021 12:31:13 +0000 (08:31 -0400)]
shortcutcontroller: Add a way to update accels
This will be used to make accel changes propagate.
Matthias Clasen [Thu, 17 Jun 2021 12:37:42 +0000 (08:37 -0400)]
action muxer: Propagate registrations further up
We were pretty aggressive about not registering
observers further than necessary, stopping at the
first muxer that provides an action.
But even though action changes further up in the tree
won't be relevant in that case, we need to listen to
accel changes, since they may come from higher up
in the tree (e.g. when using
gtk_application_set_accels_for_action with an action
that is defined on a widget.
So, register all the way to the top, and stop propagating
action changes when we hit a muxer that provides the action.
Matthias Clasen [Thu, 17 Jun 2021 12:42:03 +0000 (08:42 -0400)]
menutrackeritem: Be more careful with accel changes
In some cases (such as when getting a new parent), the
action muxer doesn't know exactly which detailed actions
have changed accels, so we call primary_accel_changed with
just an action name.
Make the menu tracker item handle that case by matching
either against the detailed name or the the action name.
Matthias Clasen [Thu, 17 Jun 2021 12:35:59 +0000 (08:35 -0400)]
action muxer: Propagate accel changes
When we set a new parent on an action muxer,
accels may change, so call primary_accel_changed
for involved actions.
Benjamin Otte [Thu, 17 Jun 2021 11:47:28 +0000 (11:47 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
spinner: Behave like any other icon
See merge request GNOME/gtk!3677
Benjamin Otte [Thu, 17 Jun 2021 10:53:01 +0000 (12:53 +0200)]
spinner: Behave like any other icon
Take the size from -gtk-icon-size.
Note that min-width/height still works, as those properties are handled
by the generic widget sizing machinery in GTK4.
Matthias Clasen [Wed, 16 Jun 2021 14:34:37 +0000 (10:34 -0400)]
actionobserver: Clarify primary_accel_changed docs
Either action_name or action_and_target may be NULL
here, and observer implementations should be careful
when checking those values.
Matthias Clasen [Wed, 16 Jun 2021 14:16:41 +0000 (10:16 -0400)]
print-editor: Make accels work
Sadly, they don't show up anymore with this.
Matthias Clasen [Wed, 16 Jun 2021 13:35:00 +0000 (09:35 -0400)]
bloatpad: Add icons as resources
This can serve as a useful example for how to add
themed icons as resources.
Matthias Clasen [Wed, 16 Jun 2021 13:26:15 +0000 (09:26 -0400)]
bloatpad: Give the toolbar a facelift
Make it look more like a toolbar.
Matthias Clasen [Wed, 16 Jun 2021 13:09:24 +0000 (09:09 -0400)]
bloatpad: Improve accel dialog
Make this dialog a bit less of an eyesore.
Matthias Clasen [Wed, 16 Jun 2021 12:45:04 +0000 (08:45 -0400)]
examples: Use existing icons
The sunny icon doesn't exist anymore.
Matthias Clasen [Wed, 16 Jun 2021 12:40:01 +0000 (08:40 -0400)]
examples: Drop a redundant frame
The frame in the drawing example adds nothing
and looks wrong.
Matthias Clasen [Wed, 16 Jun 2021 10:08:52 +0000 (10:08 +0000)]
Merge branch 'fix-3793' into 'master'
gdksurface-win32.c: Fix up popup placement (fix issue #3793)
Closes #3793
See merge request GNOME/gtk!3674
Matthias Clasen [Wed, 16 Jun 2021 10:07:29 +0000 (10:07 +0000)]
Merge branch 'media-stream-name-collision' into 'master'
mediastream: Some more api renaming
Closes #4023
See merge request GNOME/gtk!3673
Chun-wei Fan [Wed, 16 Jun 2021 04:24:47 +0000 (12:24 +0800)]
gdksurface-win32.c: Fix up popup placement
If we are undergoing a surface move, just apply the next_layout anyways,
even if we are not moving a toplevel surface.
Update the way how we obtain the x and y coordinates of a surface, if it
is a toplevel, apply the x and y coordinates from the results from we
obtained the underlying Win32 HWND, as we did before. But if it is a
popup, use gdk_win32_surface_get_geometry() to obtain the correct x and
y coordinates to place our popup surface.
Also correct how we compute the shadow dimensions, and the final popup
rectangle as we attempt to layout the popup surface, since GDK-Win32
keeps track of the shadow dimensions in system (unscaled) units, not GDK
units.
Fixes issue #3793.
Chun-wei Fan [Tue, 15 Jun 2021 08:01:09 +0000 (16:01 +0800)]
gdksurface-win32.c: Fix formatting for popup functions
Matthias Clasen [Wed, 16 Jun 2021 00:12:53 +0000 (00:12 +0000)]
Merge branch 'drop-target-name-collision' into 'master'
droptarget: Rename :drop to :current-drop
Closes #4028
See merge request GNOME/gtk!3669
Matthias Clasen [Mon, 14 Jun 2021 11:25:06 +0000 (07:25 -0400)]
mediastream: Some more api renaming
Also rename gtk_media_stream_ended to
gtk_media_stream_set_ended, to avoid naming
collision with GtkMediaStream:ended.
The existing entry points still exist, deprecated
and marked as non-introspectable.
Update all internal uses.
Fixes: #4023
Matthias Clasen [Mon, 14 Jun 2021 20:23:35 +0000 (16:23 -0400)]
droptarget: Rename :drop to :current-drop
Rename the GtkDropTraget:drop property to :current-drop,
to avoid naming collision with the signal of the same
name.
We leave the old property and getter in place, deprecated
and marked as non-introspectable.
Fixes: #4028
Matthias Clasen [Tue, 15 Jun 2021 20:29:28 +0000 (20:29 +0000)]
Merge branch 'cherry-pick-
4ba89f25' into 'master'
cellarea: Don't shrink area too much
See merge request GNOME/gtk!3672
Matthias Clasen [Tue, 15 Jun 2021 19:43:40 +0000 (19:43 +0000)]
Merge branch 'label-underline-markup' into 'master'
label: Fix mnemonic handling
Closes #4041
See merge request GNOME/gtk!3670
Benjamin Otte [Tue, 15 Jun 2021 17:34:37 +0000 (19:34 +0200)]
cellarea: Don't shrink area too much
Do not compute rectangles with negative width/height. This avoids
assertion failures further down when those rectangles were actually
checked.
https://bugzilla.redhat.com/show_bug.cgi?id=
1962215
(cherry picked from commit
4ba89f25b8a88616afc1915bdb4fb87d13efae6f)
Matthias Clasen [Tue, 15 Jun 2021 17:32:31 +0000 (13:32 -0400)]
Add a mnemonic testcase
Add a testcase that tests the label mnemonic handling
that was fixed in the previous commit.
Matthias Clasen [Tue, 15 Jun 2021 17:06:10 +0000 (13:06 -0400)]
label: Fix mnemonic handling
We were not handling the case right in which we
want to use underlines, but not use markup. Since
we are now using pango_parse_markup for this case,
we need to escape the xml markup.
Fixes: #4041
Matthias Clasen [Tue, 15 Jun 2021 11:37:57 +0000 (07:37 -0400)]
Revert "progressbar: Avoid redundant storage"
This reverts commit
95747b1a4082709d8e5320dc2171a8c53cedce19.
This was wrong - it turns out that while GtkProgressBar
allows you to change its orientation, its box layout is
always vertical.
Fixes: #4037
Emin Tufan Çetin [Tue, 15 Jun 2021 09:02:34 +0000 (09:02 +0000)]
Update Turkish translation
Matthias Clasen [Mon, 14 Jun 2021 19:20:06 +0000 (19:20 +0000)]
Merge branch 'macos-input-method' into 'master'
fix: make input method work again in gtk4
Closes #3968
See merge request GNOME/gtk!3668
Matthias Clasen [Mon, 14 Jun 2021 18:44:10 +0000 (18:44 +0000)]
Merge branch 'media-stream-name-collision' into 'master'
mediastream: Rename an api to avoid name collisions
Closes #4023
See merge request GNOME/gtk!3667
Zhi [Mon, 14 Jun 2021 16:06:35 +0000 (00:06 +0800)]
fix: make the new nsview as the first responder.
Make the new view as the first responder(focused) so the new view can
accept events from input method.
Fixes #3968.
Matthias Clasen [Mon, 14 Jun 2021 11:25:06 +0000 (07:25 -0400)]
mediastream: Rename an api to avoid name collisions
Some bindings can't handle the coexistence of
GtkMediaStream:prepared and gtk_media_stream_prepared.
Help them out by renaming the function to
gtk_media_stream_set_prepared, and rename
gtk_media_stream_unprepared as well, to match.
The existing entry points still exist, deprecated.
Update all internal uses.
Fixes: #4023
Matthias Clasen [Mon, 14 Jun 2021 10:39:43 +0000 (10:39 +0000)]
Merge branch 'columnview-double-activation' into 'master'
listitemwidget: Claim gesture when activating
Closes #4015
See merge request GNOME/gtk!3663
Matthias Clasen [Sun, 13 Jun 2021 12:03:39 +0000 (08:03 -0400)]
listitemwidget: Claim gesture when activating
Claim the gesture when we are activating a list item.
Otherwise we end up with double activations in
columnviews: first GtkColumnViewCell handles
the event, and then GtkListItemWidget handles
it again.
Fixes: #4015
Matthias Clasen [Sun, 13 Jun 2021 12:02:06 +0000 (08:02 -0400)]
listitemwidget: Match activation conditions
Make the conditions used for activation in the single-
and double-click case properly match, so that it is
obvious that we won't trigger both of them.
Matthias Clasen [Sun, 13 Jun 2021 11:38:50 +0000 (11:38 +0000)]
Merge branch 'filename-annotations' into 'master'
Add type annotations for filename arguments
Closes #633
See merge request GNOME/gtk!3665
Matthias Clasen [Sun, 13 Jun 2021 11:38:22 +0000 (11:38 +0000)]
Merge branch 'msvc-fix' into 'master'
Fix illegal instruction crash on x64 CPUs without POPCNT instruction when compiled with MSVC
See merge request GNOME/gtk!3664
Sebastian Cherek [Sat, 12 Jun 2021 17:35:13 +0000 (17:35 +0000)]
Update gtkpopcountprivate.h: undefined macro outside msvc
scherek [Sat, 12 Jun 2021 17:10:11 +0000 (19:10 +0200)]
Dropped defined() for readability
scherek [Sat, 12 Jun 2021 15:32:19 +0000 (17:32 +0200)]
Replaced && with || for POPCNT checks to fix the logic.
Matthias Clasen [Sat, 12 Jun 2021 15:12:06 +0000 (11:12 -0400)]
Add type annotations for filename arguments
Add missing "(type filename)" annotations for string
arguments that are filenames.
Fixes: #633
scherek [Sat, 12 Jun 2021 14:18:26 +0000 (16:18 +0200)]
Fix illegal instruction crash on x64 CPUs without POPCNT instruction when compiled with MSVC
Matthias Clasen [Fri, 11 Jun 2021 19:56:06 +0000 (19:56 +0000)]
Merge branch 'listmodel-get-item' into 'master'
docs: Mention the GtkWidget.destroy vfunc
Closes #4024
See merge request GNOME/gtk!3662
Matthias Clasen [Fri, 11 Jun 2021 19:38:20 +0000 (15:38 -0400)]
Add tests for empty list models
Test that all our models return NULL for out-of-range
get_item calls, as expected.
Matthias Clasen [Fri, 11 Jun 2021 19:37:16 +0000 (15:37 -0400)]
selectionfiltermodel: Fix an oversight
When the position is out of range, get_item needs
to return NULL.
Fixes: #4024
Matthias Clasen [Fri, 11 Jun 2021 14:11:53 +0000 (10:11 -0400)]
docs: Mention the GtkWidget.destroy vfunc
Mention GtkWidget.destroy in the migration guide.
Matthias Clasen [Fri, 11 Jun 2021 11:52:30 +0000 (07:52 -0400)]
docs: Fix a typo in the migration guide
Matthias Clasen [Thu, 10 Jun 2021 21:31:47 +0000 (21:31 +0000)]
Merge branch 'wip/chergert/fix-delayed-focus' into 'master'
window: clear move_focus when focus is already set
See merge request GNOME/gtk!3658
Christian Hergert [Thu, 10 Jun 2021 21:01:41 +0000 (14:01 -0700)]
window: clear move_focus when focus is already set
This can get set in other places, so we need to ensure it is cleared so
that an after-paint handler does not move the focus to a new widget.
Matthias Clasen [Thu, 10 Jun 2021 13:30:25 +0000 (13:30 +0000)]
Merge branch 'actionable-fixes' into 'master'
tests: Fix check vs toggle button confusion
Closes #4022
See merge request GNOME/gtk!3656
Matthias Clasen [Thu, 10 Jun 2021 12:37:13 +0000 (08:37 -0400)]
checkbutton: Fix actionable state tracking
If we have a GAction as model, we just have to
call gtk_action_helper_activate() and let
the action helper handle the state updates,
Fixes: #4022
Matthias Clasen [Thu, 10 Jun 2021 12:36:08 +0000 (08:36 -0400)]
togglebutton: Fix actionable state tracking
If we have a GAction as model, we just have to let
the action helper handle the state updates. GtkButton
already calls gtk_action_helper_activate() for us.
Matthias Clasen [Thu, 10 Jun 2021 12:35:24 +0000 (08:35 -0400)]
button: Add a private getter for the action helper
GtkToggleButton needs to know if it needs to actively
maintain its state, or defer to the action helper.
Matthias Clasen [Thu, 10 Jun 2021 12:10:25 +0000 (08:10 -0400)]
testgaction: Add more widgetry
Add some toggle and check buttons to test that they
work as expected as GtkActionables.
Matthias Clasen [Thu, 10 Jun 2021 11:55:45 +0000 (07:55 -0400)]
Fix the GAction test
We weren't setting the state of the stateful actions.
Matthias Clasen [Thu, 10 Jun 2021 11:49:08 +0000 (07:49 -0400)]
tests: Fix check vs toggle button confusion
Check buttons aren't toggle buttons anymore.
Matthias Clasen [Wed, 9 Jun 2021 22:23:47 +0000 (18:23 -0400)]
4.3.1
Matthias Clasen [Wed, 9 Jun 2021 17:30:02 +0000 (17:30 +0000)]
Merge branch 'ebassi/docs-for-master' into 'master'
docs: Mention Window::close-request in the migration guide
See merge request GNOME/gtk!3655
Emmanuele Bassi [Wed, 9 Jun 2021 17:11:10 +0000 (18:11 +0100)]
docs: Mention the ::damage-event signal in the migration guide
There is no replacement for damage event tracking.
Emmanuele Bassi [Wed, 9 Jun 2021 17:08:31 +0000 (18:08 +0100)]
docs: Mention GdkSurface:mapped
It replaces the ::map-event and ::unmap-event signals on GtkWidget.
Emmanuele Bassi [Wed, 9 Jun 2021 17:03:12 +0000 (18:03 +0100)]
docs: Mention Window::close-request in the migration guide
The Widget::delete-event signal was moved to Window::close-request.
Matthias Clasen [Wed, 9 Jun 2021 12:59:46 +0000 (12:59 +0000)]
Merge branch 'ci-install-build' into 'master'
Make a standalone hello world
See merge request GNOME/gtk!3652
Matthias Clasen [Wed, 9 Jun 2021 11:10:13 +0000 (07:10 -0400)]
ci: Update the image
v32 of the image includes wayland-protocols 1.21, and
other updates from Fedora 34.
While we are at it, drop gtk-doc from the image, and drop
the separate DOCS_IMAGE - no longer used.
Matthias Clasen [Wed, 9 Jun 2021 11:35:25 +0000 (07:35 -0400)]
ci: Collect hello build logs
Matthias Clasen [Tue, 8 Jun 2021 21:39:34 +0000 (17:39 -0400)]
ci: Test building against installed GTK
This is meant to ensure that we e.g. install the
right header files, and so on.
Matthias Clasen [Tue, 8 Jun 2021 21:26:36 +0000 (17:26 -0400)]
Make a standalone hello world
We want to test building against the installed GTK
in ci, so lets add a standalone project.
Matthias Clasen [Tue, 8 Jun 2021 17:17:45 +0000 (17:17 +0000)]
Merge branch 'row-activated-annotation' into 'master'
treeview: Add a few missing annotations
Closes #3828
See merge request GNOME/gtk!3647
Matthias Clasen [Tue, 8 Jun 2021 14:54:26 +0000 (14:54 +0000)]
Merge branch 'wip/carlosg/spin-button-swipe-gesture' into 'master'
spinbutton: Connect swipe gesture to the text entry
Closes #4008
See merge request GNOME/gtk!3649
Zhi [Sun, 6 Jun 2021 15:39:43 +0000 (23:39 +0800)]
fix: replace deprecated metods.
Use NSInputContext to replace NSInputManager, which has been deprecated
since 10.6.
Sync from
0e30a96 in gtk3.
Carlos Garnacho [Tue, 8 Jun 2021 13:09:37 +0000 (15:09 +0200)]
spinbutton: Mind the step in the swipe gesture
The swipe gesture forces values in the spin button that are
"impossible" according to the adjustment. This can break things
in creative ways.
Ensure the steps provided are always multiples of the adjustment
step value, and keep the remainder for further interaction.
Carlos Garnacho [Tue, 8 Jun 2021 13:06:29 +0000 (15:06 +0200)]
spinbutton: Connect swipe gesture to the text entry
In the GTK3 days, the spin button was an entry, with buttons on
top, and the swipe gesture affected the input on the entry bits.
Now the spin button is a container, so this gesture in the capture
phase applies to all contained children (incl. buttons).
Attach this gesture to the entry itself, so the buttons are left
outside this business. The gesture is still in the capture phase
in order to prevent text selection/edition/etc to happen.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4008
Matthias Clasen [Tue, 8 Jun 2021 12:59:57 +0000 (12:59 +0000)]
Apply 1 suggestion(s) to 1 file(s)